home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Shareware
/
IDimager Personal 4.2.0.3
/
setup_IDimager_Personal_V4.exe
/
{app}
/
web
/
modules
/
collimages.psc
< prev
next >
Wrap
Text File
|
2008-06-11
|
2KB
|
59 lines
%code
%include storeddata.inc %/include
%include resulttable.inc %/include
var
AItems: TCatalogItems;
AColl: TImageCollection;
i: Integer;
begin
if not FindStoredData ('dsITEMS', AItems, False) then
begin
AItems := TCatalogItems.Create (TCatalogItem, '');
StoreData ('dsITEMS', AItems);
end;
if AItems.GUID <> Request.Params.Values['GUID'] then
begin
AItems.Clear;
AItems.LastSort := csNone; // set to no sort so that the collection order is maintained
//AItems.LastSortOrder := stDescending;
AColl := TImageCollection.Create(nil);
AColl.GUID := Request.Params.Values['GUID'];
Catalog.EnumModelCollection (AColl, False);
Catalog.EnumCollectionDetails (AColl);
AItems.LastSort := AColl.LastSort;
AItems.LastSortOrder := AColl.LastSortOrder;
Catalog.EnumPhotosCollection (AColl, AItems, True, vptAlbumDisplay);
AItems.Name := toWideString('');
AItems.GUID := Request.Params.Values['GUID'];
if Nvl(SessionData.Prop['IsAdmin'], False) then
begin
AItems.Name := AItems.Name +
'<a href="%var:HomePage/%var:PageOffset/showcollection.psc?GUID=' + AItems.GUID + '" title="direct link to this collection..." target="_new">' +
'<img src="%var:PageOffset/images/link.png">' +
'</a>' +
'';
end;
AItems.Name := AItems.Name +
AColl.CollectionName +
'<span class="small"><br/>' +
AColl.CollectionDescription.Text +
'</span>';
AColl.Free;
end;
result := IncludeResultTable (AItems, 'dsITEMS', 1, 0, 0);
end;
%/code